#include "stdlib.h"
#include "stdio.h"
#include "syscall.h"


int main(int argc, char **argv)
{
	printf("Pong test.\n");
	int fd = -1;
	int i;
	char buf[256];

	fd = connect(0, 42);

	printf("Connect successful.\n");

	while(1)
	{
			memset(buf, 0, 256);
			if(read(fd, buf, 256) == -1)
			{
				printf("Pong got -1 on read\n");
				close(fd);
				return 1;
			}

			if(strlen(buf) > 0)
			{
				printf("read: %s\n", buf);
			}
	}

	return 0;
}
